package com.shuqi.model.bean;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

/**
 * 我的收藏bean
 * 
 * @author li.li
 * @date 2014-06-11
 * 
 *       cr_cover_isopen表示收费客户端封面页状态位1-开放，0-隐藏 cr_read_isopen表示收费客户端阅读页状态位 1-开放，0-隐藏
 *       sq_cover_isopen表示书旗网封面页状态位1-开放，0-隐藏 sq_read_isopen表示书旗网阅读页状态位1-开放，0-隐藏
 *       sr_cover_isopen表示免费客户端封面页状态位1-开放，0-隐藏 sr_read_isopen表示免费客户端阅读页状态位1-开放，0-隐藏
 * 
 *       只考虑cr的情况
 * 
 */
public class MyFavoritBean {
    private static SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
    public static final String COVER_OPEN = "1";// 封面开放
    public static final String COVER_CLOSED = "0";// 封面关闭
    public static final String BOOK_OPEN = "N";// 书开放
    public static final String BOOK_CLOSED = "Y";// 书关闭

    private List<MyFavorityItemBean> itemList;
    private String state;
    private String message;
    
    /**
     * @return the state
     */
    public String getState() {
        return state;
    }

    /**
     * @param state the state to set
     */
    public void setState(String state) {
        this.state = state;
    }


    /**
     * @return the message
     */
    public String getMessage() {
        return message;
    }


    /**
     * @param message the message to set
     */
    public void setMessage(String message) {
        this.message = message;
    }


    /**
     * @return the item
     */
    public List<MyFavorityItemBean> getItemList() {
        return itemList;
    }


    /**
     * @param item the item to set
     */
    public void setItemList(List<MyFavorityItemBean> itemList) {
        this.itemList = itemList;
    }



    public static final class MyFavorityItemBean {
        private String bookId;
        private String bookName;
        private String author;
        private String colTime;
        private String hide;
        private String sqCoverIsopen;
        private String srCoverIsopen;
        private String crCoverIsopen;
        private String sqReadIsopen;
        private String srReadIsOpen;
        private String crReadIsOpen;
        private String imgUrl;


        /**
         * @return the bookId
         */
        public String getBookId() {
            return bookId;
        }

        /**
         * @param bookId the bookId to set
         */
        public void setBookId(String bookId) {
            this.bookId = bookId;
        }

        /**
         * @return the bookName
         */
        public String getBookName() {
            return bookName;
        }

        /**
         * @param bookName the bookName to set
         */
        public void setBookName(String bookName) {
            this.bookName = bookName;
        }

        /**
         * @return the author
         */
        public String getAuthor() {
            return author;
        }

        /**
         * @param author the author to set
         */
        public void setAuthor(String author) {
            this.author = author;
        }

        /**
         * @return the colTime
         */
        public String getColTime() {
            return colTime;
        }

        public String colTime() {

            return format.format(new Date(Long.parseLong(colTime + "000")));
        }

        /**
         * @param colTime the colTime to set
         */
        public void setColTime(String colTime) {
            this.colTime = colTime;
        }

        /**
         * @return the hide
         */
        public String getHide() {
            return hide;
        }

        /**
         * @param hide the hide to set
         */
        public void setHide(String hide) {
            this.hide = hide;
        }

        /**
         * @return the sqCoverIsopen
         */
        public String getSqCoverIsopen() {
            return sqCoverIsopen;
        }

        /**
         * @param sqCoverIsopen the sqCoverIsopen to set
         */
        public void setSqCoverIsopen(String sqCoverIsopen) {
            this.sqCoverIsopen = sqCoverIsopen;
        }

        /**
         * @return the srCoverIsopen
         */
        public String getSrCoverIsopen() {
            return srCoverIsopen;
        }

        /**
         * @param srCoverIsopen the srCoverIsopen to set
         */
        public void setSrCoverIsopen(String srCoverIsopen) {
            this.srCoverIsopen = srCoverIsopen;
        }

        /**
         * @return the crCoverIsopen
         */
        public String getCrCoverIsopen() {
            return crCoverIsopen;
        }

        /**
         * @param crCoverIsopen the crCoverIsopen to set
         */
        public void setCrCoverIsopen(String crCoverIsopen) {
            this.crCoverIsopen = crCoverIsopen;
        }

        /**
         * @return the sqReadIsopen
         */
        public String getSqReadIsopen() {
            return sqReadIsopen;
        }

        /**
         * @param sqReadIsopen the sqReadIsopen to set
         */
        public void setSqReadIsopen(String sqReadIsopen) {
            this.sqReadIsopen = sqReadIsopen;
        }

        /**
         * @return the srReadIsOpen
         */
        public String getSrReadIsOpen() {
            return srReadIsOpen;
        }

        /**
         * @param srReadIsOpen the srReadIsOpen to set
         */
        public void setSrReadIsOpen(String srReadIsOpen) {
            this.srReadIsOpen = srReadIsOpen;
        }

        /**
         * @return the crReadIsOpen
         */
        public String getCrReadIsOpen() {
            return crReadIsOpen;
        }

        /**
         * @param crReadIsOpen the crReadIsOpen to set
         */
        public void setCrReadIsOpen(String crReadIsOpen) {
            this.crReadIsOpen = crReadIsOpen;
        }

        /**
         * @return the imgUrl
         */
        public String getImgUrl() {
            return imgUrl;
        }

        /**
         * @param imgUrl the imgUrl to set
         */
        public void setImgUrl(String imgUrl) {
            this.imgUrl = imgUrl;
        }
    }


}
